package com.google.gwt.mobile.phonegap.api;

/**
 * The Class Device.
 */
public class Device {

  /**
   * Gets the name.
   * 
   * @return the name
   */
  public native static String getName() /*-{
		return $wnd.device.name;
  }-*/;

  /**
   * Gets the phone gap.
   * 
   * @return the phone gap
   */
  public native static String getPhoneGap() /*-{
		return $wnd.device.phonegap;
  }-*/;

  /**
   * Gets the platform.
   * 
   * @return the platform
   */
  public native static String getPlatform() /*-{
		return $wnd.device.platform;
  }-*/;

  /**
   * Gets the uUID.
   * 
   * @return the uUID
   */
  public native static String getUUID() /*-{
		return $wnd.device.uuid;
  }-*/;

  /**
   * Gets the version.
   * 
   * @return the version
   */
  public native static String getVersion() /*-{
		return $wnd.device.version;
  }-*/;

  // below are Android specific APIs.

  /**
   * Exit app.
   */
  public native static void exitApp() /*-{
		if ($wnd.app && typeof $wnd.app.exitApp == "function") {
			$wnd.app.exitApp();
		}
  }-*/;

}
